package c.h.b.c.a;

import android.content.IntentSender.SendIntentException;
import c.f.c.a.e;
import c.h.a.f0.i;
import c.h.b.d.a.f;
import com.huawei.hms.iap.entity.PurchaseIntentResult;
import com.huawei.hms.support.api.client.Status;
import java.util.Objects;

/* compiled from: lambda */
public final /* synthetic */ class c implements e {
    public final /* synthetic */ j a;
    public final /* synthetic */ f b;

    public /* synthetic */ c(j jVar, f fVar) {
        this.a = jVar;
        this.b = fVar;
    }

    public final void onSuccess(Object obj) {
        j jVar = this.a;
        f fVar = this.b;
        PurchaseIntentResult purchaseIntentResult = (PurchaseIntentResult) obj;
        Objects.requireNonNull(jVar);
        Status status = purchaseIntentResult.getStatus();
        if (status.hasResolution()) {
            i iVar = (i) fVar;
            Objects.requireNonNull(iVar);
            try {
                status.startResolutionForResult(iVar.a, 2);
                obj = 1;
            } catch (SendIntentException unused) {
                obj = null;
            }
            if (obj == null) {
                iVar.a();
                return;
            }
            return;
        }
        ((i) fVar).a();
    }
}
